package practice;

public class Account3Tester {
    static int compBalance(Account2 a, Account2 b){
        if (a.getBalance()>b.getBalance())
            return 1;
        else if  (a.getBalance()<b.getBalance())
            return -1;
        return 0;
    }
    public static void main(String[] args) {
        Account2 b=new Account2("李加刚","123456x",10000);
        Account3 a=new Account3("张淳柏","888888",5000,8888888);
        a.cancel();
        switch (compBalance(a,b)){
            case 0: System.out.println("两人余额一样");break;
            case 1: System.out.println("张淳柏余额更多");break;
            case -1: System.out.println("李加刚的余额更多");break;

        }
    }
}
